$(function() {
	//加载help主要内容
	$(".help-content").load(
		"../help/helpCenter.html", 
		null, 
		function(response, status, xml) {
			if ( status !== "success" ) {
				alert("加载失败！");
			}
		}
	);				
		
});

$("#askQuestion").click(function(){
	var datastr="";
	var title=$("#title").val();
	var content=editor.html();
	datastr="title="+title+"&content="+content;
	
	$.ajax({
		url : '../help/createQuestion.html',
		data : datastr,
		type : 'post',
		dataType : 'json',
		contentType : "application/x-www-form-urlencoded;charset=utf-8",
		success : function(result) {
			if(result==true){
				alert("提问成功!");
				self.location="../help/index.html";
			}
			
		},

		error : function() {
			alert("连接服务器出错");
		}
	});
});


